package org.programmers.anonymous.fightrobots.model;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;

@JsonTypeInfo( use = Id.NAME ) 
@JsonSubTypes(
    {
        @Type( name = "Robot", value = Robot.class )
    }
)
public interface IRobot {
	
	public static enum Status {READY, FIGHT_ACTIVE, FIGHT_PASSIVE, DEAD}; 
	public static enum Action {DEFFENSE, ATTACK};
	
	public int getIdRobot();
	public void setIdRobot(int idRobot);
	public String getName();
	public void setName(String n);
	public int getLife();
	public void setLife(int l);
	
	public List<IWeapon> getRobotWeaponList();
	public void setRobotWeaponList(List<IWeapon> weaponList);
	public List<IDeffense> getRobotDeffenseList();
	public void setRobotDeffenseList(List<IDeffense> deffenseList);
	public void addWeaponIntoRobotList(IWeapon w);
	public void addDeffenseIntoRobotList(IDeffense d);
	
	public Status getCurrentStatus();
	public void setCurrentStatus(Status status);
	public Action getRandomAction();
	public Action getCurrentAction();
	//public void setCurrentAction();
	public void setAction(Action action);
	
	public int getAggressivity();
	public void setAggressivity(int aggressivity);
	
	public IWeapon getCurrentWeapon();
	public void setCurrentWeapon(IWeapon currentWeapon);
	
	public IDeffense getCurrentDeffense();
	public void setCurrentDeffense(IDeffense currentDeffense);
	
	/**
	 * @return - The Id of the current Deffense/Weapon we are using
	 */
	public int getCurrentEquipmentId();
	
	/**
	 * @return - The power of the current Deffense/Weapon we are using 
	 */
	public int getCurrentEquipmentValue();
	
	/**
	 * Compare two Robots by Name, by Life (if they had same name) or by Aggressivity (if they had same name and life)
	 * @param r - Robot to compare with
	 * @return result of compareTo (type int)
	 */
	public int compareTo(Robot r);
	
	public boolean equals(Object r);
	
	public int getCurrentEquipmentHits();
	public boolean getNewEquipment();

	
	

}
